﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Text;

namespace UtilZ.Dotnet.Ex.Communication.Base
{
    /// <summary>
    /// 分包参数
    /// </summary>
    public class DefaultUnpackerPara : UnpackerParaAbs
    {
        /// <summary>
        /// 用于拆包的数据Buffer
        /// </summary>
        public byte[] Buffer { get; set; }

        /// <summary>
        /// 可拆包数据起始位置
        /// </summary>
        public int Offset { get; set; }

        /// <summary>
        /// 可拆包数据总长度
        /// </summary>
        public int DataLength { get; set; }

        /// <summary>
        /// 本次接收到数据包长度
        /// </summary>
        public int ReceiveLength { get; set; }

        /// <summary>
        /// 数据读取器
        /// </summary>
        public BinaryReader Reader { get; set; }

        /// <summary>
        /// 构造函数
        /// </summary>
        public DefaultUnpackerPara()
            : base()
        {

        }
    }
}
